#!/usr/bin/env python
PACKAGE = "roboteq_control"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#Reference in page 321 - MMOD
closed_loop_vel = gen.enum([ gen.const("closed_loop_speed",          int_t, 1, "Closed loop speed (Sec. 9 pag. 113)"),
                             gen.const("closed_loop_speed_position", int_t, 6, "Closed loop speed position (Sec. 9 pag. 114)")],
                            "Type fo velocity control mode")
gen.add("closed_loop_velocity", int_t, 0, "Configuration closed loop", 6, 1, 6, edit_method=closed_loop_vel)

closed_loop_pos = gen.enum([ gen.const("closed_loop_position_relative",  int_t, 2, "Closed loop position relative (Sec. 10 pag. 121)"),
                             gen.const("closed_loop_count_position",     int_t, 3, "Closed loop count position (Sec. 10 pag. 121)"),
                             gen.const("closed_loop_position_tracking",  int_t, 4, "Closed loop position tracking (Sec. 10 pag. 122)")],
                            "Type fo position control mode")
gen.add("closed_loop_position", int_t, 0, "Configuration closed loop", 2, 2, 4, edit_method=closed_loop_pos)

#Default command
gen.add("restore_defaults", bool_t  , 0, "Restore to the original configuration", False      )

exit(gen.generate(PACKAGE, "roboteq_node", "RoboteqPIDtype"))
